package parse

import (
	"fmt"
	"strings"

	"github.com/dave/dst"
)

type Class struct {
	Name          string
	GlobalName    string
	NameInProject string
	Package       *Package
	Fields        map[string]*dst.Field
	Functions     map[string]*dst.FuncDecl
}

func newClass(pkg *Package, name string) *Class {
	return &Class{
		Name:          name,
		GlobalName:    strings.TrimPrefix(fmt.Sprintf("%s/%s", pkg.GlobalName, name), "/"),
		NameInProject: strings.TrimPrefix(fmt.Sprintf("%s/%s", pkg.NameInProject, name), "/"),
		Fields:        map[string]*dst.Field{},
		Functions:     map[string]*dst.FuncDecl{},
		Package:       pkg,
	}
}
